package opreation.impl;

import book.BookList;
import opreation.IOperation;

//输入书籍的名称找对应的书籍
public class FindOperation implements IOperation {
    @Override
    public void work(BookList bookList) {
        System.out.print("请输入想要查询的书籍：");
        String name = scanner.next();
        if(bookList.contains(name)){
            System.out.println("已成功为您找到以下书籍：");
            System.out.println(bookList.findBook(name));
        }else{
            System.out.println("您找的书不存在！");
        }
    }
}
